package com.huluobo.a2110mvpimdemo.chat;

import com.hyphenate.chat.EMMessage;

import java.util.List;

/**
 * Created by LC on 2023/12/25.
 * 聊天的协议
 */
public interface ChatContract {
    interface Presenter {
        void sendMessage(String username, String content);

        void addMessage(String username, List<EMMessage> messages);

        void loadMessage(String username);

        void loadMoreMessage(String username);
    }

    interface View {
        void onStartSendMessage();//控制进度条

        void onSendMessageSuccess();

        void onSendMessageFailed(String error);

        void onMessageLoaded();//读取历史消息,进入聊天页面就显示

        void onMoreMessageLoaded(int size);//加载更多消息,下拉时加载
    }
}
